<template>
  <div class="app-container home">
    <!-- @putTab="getChangeTab" -->
    <NavigationBar></NavigationBar>
    <!-- <div v-if="changeTab=='1'">
      <local-forum-page></local-forum-page>
    </div>
    <div v-if="changeTab=='2'">
      <forum-page></forum-page>
    </div> -->
    <router-view></router-view>
    <div v-if="isPostDetail">
      <post-detail></post-detail>
    </div>
  </div>
</template>

<script>
import { getUserProfile } from "@/api/system/user";
import NavigationBar from "@/components/Head/NavigationBar.vue"
import ForumPage from "@/views/schoolForum/ForumPage"
import localForumPage from "@/views/schoolForum/localForumPage"
import PostDetail from "@/views/schoolForum/PostDetail"
import usePostStore from '@/store/forum/post';

export default {
  name: "Index",
  data() {
    return {
      // user: {},
      // changeTab: 1
    }
  },
  components:{
    NavigationBar,
    localForumPage,
    ForumPage,
    PostDetail
  },
  computed:{
    isPostDetail(){
      return false;
    },
    changeTab(){
      console.log(usePostStore().changeTab)
      return usePostStore().changeTab;
    }
  },
  created(){
  },
  methods: {
    // getUser() {
    //   getUserProfile().then(response => {
    //     this.user = response.data;
    //   });
    // },
    // getChangeTab(e){
    //   console.log("切换到"+e);
    //   this.changeTab=e;
    // }

    
  }
};
</script>

<style scoped lang="scss">

</style>